from rest_framework_simplejwt.views import (
    # token
    # TokenObtainPairView,
    # 刷新
    TokenRefreshView,
    # 验证
    TokenVerifyView
)
from .views import CustomTokenObtainPairView, UserAPIView, SMSAPIView
from django.urls import path, re_path
from .utils import PhoneApiView
urlpatterns = [
    # 获取token的接口
    path('api/login/', CustomTokenObtainPairView.as_view()),
    #     刷新接口
    path('api/token/refresh/', TokenRefreshView.as_view()),
    #     验证
    path('api/token/verify/', TokenVerifyView.as_view()),
    path("", UserAPIView.as_view()),
    re_path(r"phone/(?P<phone>1[3-9]\d{9})/", PhoneApiView.as_view()),
    re_path(r"sms/(?P<phone>1[3-9]\d{9})/", SMSAPIView.as_view()),

]
